﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ReadMsg.aspx.cs" Inherits="ReadMsg" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>读取信息</title>
    <link href="css/allocation.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="wrapper">
        <div id="mainContent">
            <div id="allocationTable" class="dhd_table">
                <form id="form1" runat="server">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td colspan="2" style="padding-left: 0;;padding-right:0">
                                <h1 style="text-align: left">
                                    您有
                                        <asp:Label ID="lblNoReadMsg" runat="server"></asp:Label>条未读信息！</h1>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="padding-left: 0;padding-right:0">
                                <asp:DataGrid ID="dgNoReadMsg" runat="server" PageSize="5" 
                                    AutoGenerateColumns="False" AllowPaging="True" 
                                    OnPageIndexChanged="dgNoReadMsg_PageIndexChanged" Width="100%" 
                                    onitemdatabound="dgNoReadMsg_ItemDataBound">
                                    <PagerStyle PageButtonCount="5"
                                        NextPageText="下一页" PrevPageText="上一页" />
                                    <Columns>
                                        <asp:BoundColumn DataField="FROMUSERNAME" HeaderText="发送人" Visible="False"></asp:BoundColumn>
                                        <asp:TemplateColumn HeaderText="发送人">
                                            <ItemTemplate>
                                                <asp:Label ID="lblTrueName" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:BoundColumn DataField="TITLE" HeaderText="信息标题"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="SENDDATE" HeaderText="发送时间" DataFormatString="{0:yy-MM-dd}">
                                        </asp:BoundColumn>
                                        <asp:HyperLinkColumn DataNavigateUrlField="AUTOID" DataNavigateUrlFormatString="showMsg.aspx?ID={0}"
                                            HeaderText="查看内容" Text="打开"></asp:HyperLinkColumn>
                                    </Columns>
                                    <HeaderStyle ForeColor="#046D30" />
                                </asp:DataGrid></td>
                        </tr>
                        <tr>
                            <td style="padding-left: 0;padding-right:0" colspan="2">
                                <h1 style="text-align: left">
                                    您有<asp:Label ID="lblReadedCount" runat="server"></asp:Label>条阅读记录</h1>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" style="padding-left: 0;padding-right:0; height: 30px;">
                                <asp:DataGrid ID="dgReadedMsg" runat="server" AllowPaging="True" 
                                    AutoGenerateColumns="False" PageSize="5" OnPageIndexChanged="dgReadedMsg_PageIndexChanged"
                                    OnItemCommand="dgReadedMsg_ItemCommand" OnItemCreated="dgReadedMsg_ItemCreated"
                                    Width="100%" onitemdatabound="dgReadedMsg_ItemDataBound">
                                    <FooterStyle HorizontalAlign="Center" />
                                    <PagerStyle PageButtonCount="5"
                                        NextPageText="下一页" PrevPageText="上一页" />
                                    <Columns>
                                        <asp:BoundColumn DataField="AUTOID" HeaderText="信息ID" Visible="False"></asp:BoundColumn>
                                        <asp:BoundColumn DataField="FROMUSERNAME" HeaderText="发送人" Visible="False"></asp:BoundColumn>
                                        <asp:TemplateColumn HeaderText="发送人">
                                            <ItemTemplate>
                                                <asp:Label ID="lblSendName" runat="server"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                        <asp:BoundColumn DataField="TITLE" HeaderText="信息标题"></asp:BoundColumn>
                                        <asp:HyperLinkColumn DataNavigateUrlField="AUTOID" DataNavigateUrlFormatString="showMsg.aspx?ID={0}"
                                            HeaderText="查看内容" Text="打开"></asp:HyperLinkColumn>
                                        <asp:TemplateColumn HeaderText="删除信息">
                                            <ItemTemplate>
                                                <asp:Button ID="btnDelete" runat="server" CommandName="deleteMsg" Text="删除" />
                                            </ItemTemplate>
                                        </asp:TemplateColumn>
                                    </Columns>
                                    <HeaderStyle ForeColor="#046D30" />
                                </asp:DataGrid></td>
                        </tr>
                      
                    </table>
                </form>
            </div>
        </div>
        <!-- end of mainContent -->
        <!-- end of mainContent -->
        <div id="copyright">
            <p>
                Copyright&copy; 2009-2010 All rights reserved.<strong>桂林供电局</strong></p>
        </div>
    </div>
</body>
</html>
